import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import {getQueryString} from '../utils/util';
import Xc from '../components/xc';

import '../static/styles/xc.css';
import { get } from '../api/getData';

class Order extends Component {
    constructor(props) {
        super(props);
        this.state = {
            activity:[]
        }
    }

    componentDidMount() {
        document.title = '我的行程';
        document.body.style.overflow = 'auto';
        let __this = this;
        get('/api/activity/enroll/activity', {}, function(error, data){
            if(error === null){
                __this.setState({
                    activity:data.data.list
                });
            }
        })

    }

    render() {
        return (<div>
            {
                this.state.activity.map(function(item, index){
                    return <Xc data={item} key={index}/>
                })
            }
        </div>);
    }
}

export default Order;
